package com.aspose.cells;

import java.util.ArrayList;

public class Axis {
   ArrayList a;
   ArrayList b;
   byte[] c;
   private Chart h;
   private int i;
   String d = "";
   String e = "";
   private int j = 3;
   private Area k;
   private Object l;
   private boolean m = true;
   private boolean n = true;
   private Object o;
   private boolean p = true;
   private double q;
   private boolean r = true;
   private double s;
   private Line t;
   private int u = 3;
   private int v = 2;
   private int w = 2;
   private double x;
   boolean f = false;
   private int y = 0;
   private boolean z;
   private double A = 10.0D;
   private boolean B;
   private boolean C;
   private boolean D = true;
   private TickLabels E;
   private int F = 1;
   private boolean G = true;
   private int H = 1;
   private int I = 0;
   private int J = 0;
   private DisplayUnitLabel K;
   private boolean L = true;
   private Title M;
   boolean g;
   private int N = 0;
   private int O;
   private boolean P = true;
   private int Q;
   private int R;
   private boolean S;
   private Line T;
   private Line U;
   private boolean V = true;
   private ShapePropertyCollection W;
   private ShapePropertyCollection X;
   private ShapePropertyCollection Y;

   Axis(int type, boolean visible, Chart chart) {
      this.h = chart;
      this.i = type;
      if (type == 0) {
         this.x = 1.0D;
      }

      this.setVisible(visible);
   }

   Chart a() {
      return this.h;
   }

   int b() {
      return this.i;
   }

   void a(int var1) {
      this.i = var1;
   }

   int c() {
      return this.j;
   }

   void b(int var1) {
      this.j = var1;
   }

   public Area getArea() {
      if (this.k == null) {
         this.k = new Area(this.h, this);
      }

      return this.k;
   }

   Area d() {
      return this.k;
   }

   boolean e() {
      return this.m;
   }

   public boolean isAutomaticMinValue() {
      return this.m;
   }

   public void setAutomaticMinValue(boolean value) {
      this.m = value;
   }

   public Object getMinValue() {
      return this.l;
   }

   public void setMinValue(Object value) {
      if (value == null) {
         this.m = true;
      } else {
         Class var2 = value.getClass();
         switch(zamo.a(var2)) {
         case 5:
            this.l = (double)(Byte)value;
            this.m = false;
            break;
         case 6:
            this.l = (double)((Byte)value & 255);
            this.m = false;
            break;
         case 7:
            this.l = (double)(Short)value;
            this.m = false;
            break;
         case 8:
            this.l = (double)((Integer)value & '\uffff');
            this.m = false;
            break;
         case 9:
            this.l = (double)(Integer)value;
            this.m = false;
            break;
         case 10:
            this.l = (double)((Long)value & 4294967295L);
            this.m = false;
            break;
         case 11:
            this.l = (double)(Long)value;
            this.m = false;
            break;
         case 12:
            this.l = (double)(Long)value;
            this.m = false;
            break;
         case 13:
            this.l = (double)(Float)value;
            this.m = false;
            break;
         case 14:
         case 16:
            this.l = value;
            this.m = false;
            break;
         case 15:
         default:
            throw new CellsException(1, "MinValue should be numeric or Date values.");
         }

      }
   }

   void a(Object var1) {
      this.l = var1;
   }

   void b(Object var1) {
      this.o = var1;
   }

   public boolean isAutomaticMaxValue() {
      return this.n;
   }

   public void setAutomaticMaxValue(boolean value) {
      this.n = value;
   }

   boolean f() {
      return this.n;
   }

   public Object getMaxValue() {
      return this.o;
   }

   public void setMaxValue(Object value) {
      if (value == null) {
         this.n = true;
      } else {
         Class var2 = value.getClass();
         switch(zamo.a(var2)) {
         case 5:
            this.o = (double)(Byte)value;
            this.n = false;
            break;
         case 6:
            this.o = (double)((Byte)value & 255);
            this.n = false;
            break;
         case 7:
            this.o = (double)(Short)value;
            this.n = false;
            break;
         case 8:
            this.o = (double)((Integer)value & '\uffff');
            this.n = false;
            break;
         case 9:
            this.o = (double)(Integer)value;
            this.n = false;
            break;
         case 10:
            this.o = (double)((Long)value & 4294967295L);
            this.n = false;
            break;
         case 11:
            this.o = (double)(Long)value;
            this.n = false;
            break;
         case 12:
            this.o = (double)(Long)value;
            this.n = false;
            break;
         case 13:
            this.o = (double)(Float)value;
            this.n = false;
            break;
         case 14:
         case 16:
            this.o = value;
            this.n = false;
            break;
         case 15:
         default:
            throw new CellsException(1, "MaxValue should be numeric or Date values.");
         }

      }
   }

   public boolean isAutomaticMajorUnit() {
      return this.p;
   }

   public void setAutomaticMajorUnit(boolean value) {
      this.p = value;
   }

   boolean g() {
      return this.p;
   }

   public double getMajorUnit() {
      return this.q;
   }

   public void setMajorUnit(double value) {
      if (value <= 0.0D) {
         throw new IllegalArgumentException("Invalid major unit: it must be greated than zero.");
      } else {
         this.q = value;
         this.p = false;
      }
   }

   void a(double var1) {
      this.q = var1;
   }

   public boolean isAutomaticMinorUnit() {
      return this.r;
   }

   public void setAutomaticMinorUnit(boolean value) {
      this.r = value;
   }

   boolean h() {
      return this.r;
   }

   public double getMinorUnit() {
      return this.s;
   }

   public void setMinorUnit(double value) {
      if (value <= 0.0D) {
         throw new IllegalArgumentException("Invalid minor unit: it must be greated than zero.");
      } else {
         this.s = value;
         this.r = false;
      }
   }

   void b(double var1) {
      this.s = var1;
   }

   public Line getAxisLine() {
      if (this.t == null) {
         this.t = new Line(this.h, this);
      }

      return this.t;
   }

   Line i() {
      return this.t;
   }

   public int getMajorTickMark() {
      return this.u;
   }

   public void setMajorTickMark(int value) {
      this.u = value;
      this.z = true;
   }

   public int getMinorTickMark() {
      return this.v;
   }

   public void setMinorTickMark(int value) {
      this.v = value;
      this.z = true;
   }

   public int getTickLabelPosition() {
      return this.w;
   }

   public void setTickLabelPosition(int value) {
      this.w = value;
      this.z = true;
   }

   public double getCrossAt() {
      return this.x;
   }

   public void setCrossAt(double value) {
      this.f = false;
      switch(this.i) {
      case 0:
         if (ChartCollection.l(this.h.getType())) {
            this.x = value;
            this.y = 2;
         } else {
            int var3 = (int)value;
            if (var3 >= 1 && var3 <= 31999) {
               this.x = (double)var3;
               this.y = 2;
            }
         }
         break;
      case 1:
         this.x = value;
         this.y = 2;
      }

   }

   void c(double var1) {
      this.x = var1;
      this.y = 2;
      this.f = false;
   }

   /** @deprecated */
   public int getCrosses() {
      return this.y;
   }

   /** @deprecated */
   public void setCrosses(int value) {
      this.y = value;
      if (value != 0) {
         this.f = false;
      }

   }

   public int getCrossType() {
      return this.y;
   }

   public void setCrossType(int value) {
      this.y = value;
   }

   boolean j() {
      return this.z;
   }

   public double getLogBase() {
      return this.A;
   }

   public void setLogBase(double value) {
      this.A = value;
   }

   public boolean isLogarithmic() {
      return this.B;
   }

   public void setLogarithmic(boolean value) {
      this.B = value;
   }

   public boolean isPlotOrderReversed() {
      return this.C;
   }

   public void setPlotOrderReversed(boolean value) {
      this.C = value;
   }

   public boolean getAxisBetweenCategories() {
      return this.D;
   }

   public void setAxisBetweenCategories(boolean value) {
      this.D = value;
   }

   public TickLabels getTickLabels() {
      if (this.E == null) {
         this.E = new TickLabels(this);
         this.z = true;
      }

      return this.E;
   }

   TickLabels k() {
      return this.E;
   }

   public int getTickLabelSpacing() {
      return this.F;
   }

   public void setTickLabelSpacing(int value) {
      if (value >= 1 && value <= 31999) {
         this.F = value;
         this.G = false;
      } else {
         throw new IllegalArgumentException("Invalid tick label spacing : it must be between 1 and 31999.");
      }
   }

   void c(int var1) {
      this.F = var1;
   }

   boolean l() {
      return this.G;
   }

   void a(boolean var1) {
      this.G = var1;
   }

   public int getTickMarkSpacing() {
      return this.H;
   }

   public void setTickMarkSpacing(int value) {
      if (value >= 1 && value <= 31999) {
         this.H = value;
      }

   }

   public int getDisplayUnit() {
      return this.I;
   }

   public void setDisplayUnit(int value) {
      if (this.I != value) {
         if (value == 0) {
            this.K = null;
            this.I = value;
         } else {
            if (this.I == 0 && this.L) {
               this.K = new DisplayUnitLabel(this);
            }

            this.I = value;
         }
      }
   }

   public int getCustUnit() {
      return this.J;
   }

   public void setCustUnit(int value) {
      this.setDisplayUnit(10);
      this.J = value;
   }

   public DisplayUnitLabel getDisplayUnitLabel() {
      if (this.K == null) {
         this.K = new DisplayUnitLabel(this);
      }

      return this.K;
   }

   DisplayUnitLabel m() {
      return this.K;
   }

   public boolean isDisplayUnitLabelShown() {
      return this.L;
   }

   public void setDisplayUnitLabelShown(boolean value) {
      if (value && this.K == null) {
         this.K = new DisplayUnitLabel(this);
      }

      this.L = value;
   }

   void b(boolean var1) {
      this.L = var1;
   }

   Title n() {
      return this.M;
   }

   public Title getTitle() {
      if (this.M == null) {
         this.M = new Title(this);
         if (this.i == 1) {
            this.M.setRotationAngle(90);
         }

         this.M.getBorder().setVisible(false);
         this.M.getArea().setFormatting(1);
      }

      return this.M;
   }

   public int getCategoryType() {
      return this.N;
   }

   public void setCategoryType(int value) {
      this.N = value;
      this.g = true;
   }

   public int getBaseUnitScale() {
      return this.O;
   }

   public void setBaseUnitScale(int value) {
      this.O = value;
      this.P = false;
   }

   void d(int var1) {
      this.O = var1;
   }

   public boolean isBaseUnitAuto() {
      return this.P;
   }

   public void setBaseUnitAuto(boolean value) {
      this.P = value;
   }

   public int getMajorUnitScale() {
      return this.Q;
   }

   public void setMajorUnitScale(int value) {
      this.Q = value;
      this.p = false;
      if (this.q == 0.0D) {
         this.q = 1.0D;
      }

   }

   void e(int var1) {
      this.Q = var1;
   }

   public int getMinorUnitScale() {
      return this.R;
   }

   public void setMinorUnitScale(int value) {
      this.R = value;
      this.r = false;
      if (this.s == 0.0D) {
         this.s = 1.0D;
      }

   }

   void f(int var1) {
      this.R = var1;
   }

   public boolean isVisible() {
      return this.S;
   }

   public void setVisible(boolean value) {
      this.S = value;
   }

   void a(Axis var1, CopyOptions var2) {
      this.i = var1.i;
      this.d = var1.d;
      if (var1.t != null) {
         this.getAxisLine().a(var1.t);
      } else {
         this.t = null;
      }

      this.V = var1.V;
      this.S = var1.S;
      this.o = var1.o;
      this.l = var1.l;
      this.q = var1.q;
      this.s = var1.s;
      this.p = var1.p;
      this.r = var1.r;
      this.m = var1.m;
      this.n = var1.n;
      this.u = var1.u;
      this.v = var1.v;
      this.z = var1.z;
      this.w = var1.w;
      this.x = var1.x;
      this.y = var1.y;
      this.B = var1.B;
      this.C = var1.C;
      this.D = var1.D;
      if (var1.E != null) {
         this.E = new TickLabels(this);
         this.E.a(var1.E);
      } else {
         this.E = null;
      }

      this.G = var1.G;
      this.F = var1.F;
      this.H = var1.H;
      this.I = var1.I;
      this.J = var1.J;
      this.L = var1.L;
      if (var1.K != null) {
         this.getDisplayUnitLabel().a(var1.K, var2);
      } else {
         this.K = null;
      }

      if (var1.M != null) {
         this.M = new Title(this);
         this.M.a(var1.M, var2);
      } else {
         this.M = null;
      }

      this.N = var1.N;
      this.O = var1.O;
      this.P = var1.P;
      this.Q = var1.Q;
      this.R = var1.R;
      if (var1.T != null) {
         this.T = new Line(this.h, this);
         this.T.a(var1.T);
      } else {
         this.T = null;
      }

      if (var1.U != null) {
         this.getMinorGridLines().a(var1.U);
      } else {
         this.U = null;
      }

      if (var1.W != null) {
         this.W = new ShapePropertyCollection(this.h, this, 0);
         this.W.a(var1.W, var2);
      }

      if (var1.X != null) {
         this.X = new ShapePropertyCollection(this.h, this, 1);
         this.X.a(var1.X, var2);
      }

      if (var1.Y != null) {
         this.Y = new ShapePropertyCollection(this.h, this, 2);
         this.Y.a(var1.Y, var2);
      }

      int var3;
      if (var1.a != null && var1.a.size() > 0) {
         this.a = new ArrayList();

         for(var3 = 0; var3 < var1.a.size(); ++var3) {
            com.aspose.cells.b.a.a.ze.a(this.a, var1.a.get(var3));
         }
      }

      if (var1.b != null && var1.b.size() > 0) {
         this.b = new ArrayList();

         for(var3 = 0; var3 < var1.b.size(); ++var3) {
            com.aspose.cells.b.a.a.ze.a(this.b, var1.b.get(var3));
         }
      }

      this.c = var1.c;
   }

   Line o() {
      return this.T;
   }

   void a(Line var1) {
      this.T = var1;
   }

   public Line getMajorGridLines() {
      if (this.T == null) {
         this.T = new Line(this.h, this);
         this.T.setVisible(false);
      }

      return this.T;
   }

   Line p() {
      return this.U;
   }

   void b(Line var1) {
      this.U = var1;
   }

   public Line getMinorGridLines() {
      if (this.U == null) {
         this.U = new Line(this.h, this);
         this.U.setVisible(false);
      }

      return this.U;
   }

   boolean q() {
      switch(this.i) {
      case 0:
         return this.h.getCategoryAxis() == this;
      case 1:
         return this.h.getValueAxis() == this;
      default:
         return true;
      }
   }

   public boolean hasMultiLevelLabels() {
      return this.V;
   }

   public void setHasMultiLevelLabels(boolean value) {
      this.V = value;
   }

   ShapePropertyCollection r() {
      if (this.W == null) {
         this.W = new ShapePropertyCollection(this.h, this, 0);
      }

      return this.W;
   }

   ShapePropertyCollection s() {
      if (this.X == null) {
         this.X = new ShapePropertyCollection(this.h, this, 1);
      }

      return this.X;
   }

   ShapePropertyCollection t() {
      if (this.Y == null) {
         this.Y = new ShapePropertyCollection(this.h, this, 2);
      }

      return this.Y;
   }

   /** @deprecated */
   public boolean isAutoCross() {
      return this.getCrossType() == 0;
   }

   /** @deprecated */
   public boolean isCrossAtMax() {
      return this.getCrossType() == 1;
   }

   /** @deprecated */
   public void setAutoCross() {
      this.setCrossType(0);
   }

   /** @deprecated */
   public void setCrossAtMax(boolean isCrossAtMax) {
      if (isCrossAtMax) {
         this.setCrossType(1);
      }

   }
}
